﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

public partial class WebRequest设定上次访问的来源用于判断来源的站点 : System.Web.UI.Page
{
    

    protected void Page_Load(object sender, EventArgs e)
    {
       

        ///设定头
        System.Net.HttpWebRequest Myrequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://bk.17173.com/ask/1000306/2007/12/24/336434.shtml");

        Myrequest.Referer = "http://bk.17173.com/asklist.php";//设定来源 用于
        Myrequest.Timeout = 6000;
        //转成文件流
        System.IO.Stream oo = Myrequest.GetResponse().GetResponseStream();
        System.IO.StreamReader MyStreamRead = new System.IO.StreamReader(oo, System.Text.Encoding.GetEncoding("GB2312"));
        Response.Write(MyStreamRead.ReadToEnd().ToString());
        
    }
}
